package Leo.serviceClient.feign;

import Leo.serviceClient.entity.User;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.cloud.netflix.feign.FeignClientsConfiguration;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient(value = "FAQ-Service-Provider")
public interface ProviderClient {
    @RequestMapping(value = "/test")
    String test();

    @RequestMapping(method = RequestMethod.POST,value="/getUser/{userid}")
    User getUser(@PathVariable("userid") String userId);

    @RequestMapping(method = RequestMethod.POST,value="/getUsers")
    Map<String,User> getUsers(@RequestParam("userId") String userId);
//    Object getUsers(@RequestParam("userId") String userId);
}
